      import Vue from 'vue'
      import VueRouter from 'vue-router'
      // import {routerTest} from './router';
      import {routes} from './routes';
      Vue.use(VueRouter)

       /*测试一层路由*/
  /*    export const routerTest = [
        {path: '/TestA/:id', component: () => import('@/components/routerTest/TestA.vue')},
        {path: '/TestB', component: () => import('@/components/routerTest/TestB.vue')},
        {path: '/TestC', component: () => import('@/components/routerTest/TestC.vue')}
      ]*/


        //创建 router 实例，然后传 `RouterConfig` 配置
        export const router = new VueRouter({
          //routes:routerTest//测试一层路由
          routes:routes
        });



      //全局守卫
      router.beforeEach((to, from, next) => {
        //console.log(to, from, next);
        next(true)//千万记住要写这个
      });

      router.afterEach((to) => {
        //console.log(to);
      });


